package com.common.util.javers.process;

import org.javers.core.diff.Change;

import java.io.Serializable;
import java.util.List;

/**
 * Created by Kenti on 2016/2/1.
 */
public interface LogProcess {

    /**
     * 根据Id获取对象
     * @param clazz
     * @param identityId
     * @return
     */
    Object getFromDB(Class clazz, Serializable identityId);

    /**
     * 获取当前操作的用户
     * @return
     */
    String getCurrentOperatUser();

    void doLog(String moduleName, Serializable identityId, String operationName);

    void doLog(String moduleName, Serializable identityId, String operationName, Object object, List<Change> changes);

}
